<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>文档标题</title>
</head>
<body>
<div id="box">

</div>

<script>
    window.onload = function () {
      const box = document.getElementById("box");
      const ul = document.createElement("ul");
      const fruits = ["apple", "banana", "orange", "pear", "peach"]
      for (const fruit of fruits) {
        const li = document.createElement("li");
        li.innerText = fruit;
        ul.appendChild(li);
      }
      box.appendChild(ul);
    }
</script>
</body>
</html>
